this._errorBox.hide();
this.setButtons([{ action: Lang.bind(this, this.close),
- label: _("Cancel"),
- key: Clutter.Escape },
- { action: Lang.bind(this,
- function() {
- this._activate(false);
- }),
- label: _("Run"),
- isDefault: true }]);
+ label: _("Close"),
+ key: Clutter.Escape }]);
this._pathCompleter = new Gio.FilenameCompleter();
this._commandCompleter = new CommandCompleter();
this._entryText.connect('key-press-event', Lang.bind(this, function(o, e) {
let symbol = e.get_key_symbol();
if (symbol == Clutter.Return || symbol == Clutter.KP_Enter) {
- this._activate(e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+ this.popModal();
+ this._run(o.get_text(),
+ e.get_state() & Clutter.ModifierType.CONTROL_MASK);
+ if (!this._commandError ||
+ !this.pushModal())
+ this.close();
+
return true;
}
if (symbol == Clutter.slash) {
}));
},
- _activate: function(inTerminal) {
- this.popModal();
- this._run(this._entryText.get_text(), inTerminal);
- if (!this._commandError ||
- !this.pushModal())
- this.close();
- },
-
_getCompletion : function(text) {
if (text.indexOf('/') != -1) {
return this._pathCompleter.get_completion_suffix(text);